﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace GameSchool.Models
{
	/// <summary>
	/// Level er gagnaklasi sem geymir þær upplýsingar sem þarf til að skrá ný borð á námskeið í gagnagrunninn. 
	/// </summary>  
	
	[Table("gs_level")]
	public class Level
    {
        public Level()
        {
            this.Assignments = new List<Assignment>();
        }

		[Key]
		[Column("level_id")]
        public int LevelId { get; set; }

        [Column("course_id")]
        public int CourseId { get; set; }

        [ForeignKey("CourseId")]
        public virtual Course Course { get; set; }

		[Column("level_name")]
		[Display(Name = "Heiti borðs")]
        public string LevelName { get; set; }

        [Column("level_number")]
		[Display(Name = "Borð númer:")]
        public int LevelNumber { get; set; }
		
        [Column("days_to_finish")]
		[Display(Name = "Dagar efir:")]
        public int DaysToFinish { get; set; }
		
        [Column("initial_like_quota")]
        public int InitialLikeQuota { get; set; }
		
        [Column("active")]
        public bool Active { get; set; }

        public virtual ICollection<Assignment> Assignments { get; set; }
    }
}